enum dtype_tcm_object_view {
	TYPE(TCM_OBJECT_VIEW)=0x4400,
	TYPE(TCM_OBJECT_QUERY)=0x4410,
	TYPE(TCM_PIK_QUERY)=0x4420
};
enum subtype_tcm_object_view {
	SUBTYPE(TCM_OBJECT_VIEW,NODE)=0x1,
	SUBTYPE(TCM_OBJECT_VIEW,TCM),
	SUBTYPE(TCM_OBJECT_VIEW,PRIVATEKEY),
	SUBTYPE(TCM_OBJECT_VIEW,PUBLICKEY),
	SUBTYPE(TCM_OBJECT_VIEW,PUBKEYSTORE)
};
enum subtype_tcm_object_query {
	SUBTYPE(TCM_OBJECT_QUERY,NODE)=0x1,
	SUBTYPE(TCM_OBJECT_QUERY,TCM),
	SUBTYPE(TCM_OBJECT_QUERY,PRIVATEKEY),
	SUBTYPE(TCM_OBJECT_QUERY,PUBLICKEY)
};
enum subtype_tcm_pik_query {
	SUBTYPE(TCM_PIK_QUERY,PIK)=0x1,
};
typedef struct tcm_cube_node_desc{
	BYTE uuid[32];
	char name[32];
	char * proc_name;
	UINT32 node_type;
	char * network_addr;
	char * node_desc;
}__attribute__((packed)) RECORD(TCM_OBJECT_VIEW,NODE);

typedef struct tcm_cube_tcm_desc{
	BYTE pubek[32];
	BYTE uuid[32];
	char owner[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_VIEW,TCM);

typedef struct tcm_relate_private_key{
	BYTE uuid[32];
	BYTE tcm_uuid[32];
	BYTE issmkwrapped;
	UINT32 key_usage;
	UINT32 key_flags;
	BYTE pcrinfo_uuid[32];
	BYTE wrapkey_uuid[32];
	BYTE pubkey_uuid[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_VIEW,PRIVATEKEY);

typedef struct tcm_relate_public_key{
	BYTE uuid[32];
	BYTE tcm_uuid[32];
	BYTE ispubek;
	UINT32 key_usage;
	UINT32 key_flags;
	BYTE pcrinfo_uuid[32];
	BYTE privkey_uuid[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_VIEW,PUBLICKEY);

typedef struct tcm_relate_pubkey_store{
	BYTE uuid[32];
	BYTE node_uuid[32];
	char username[32];
	BYTE origin_uuid[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_VIEW,PUBKEYSTORE);

typedef struct tcm_cube_node_query{
	BYTE uuid[32];
	char name[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_QUERY,NODE);

typedef struct tcm_cube_tcm_query{
	BYTE uuid[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_QUERY,TCM);

typedef struct tcm_cube_private_query{
	BYTE uuid[32];
	BYTE tcm_uuid[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_QUERY,PRIVATEKEY);

typedef struct tcm_cube_public_key{
	BYTE uuid[32];
	BYTE origin_uuid[32];
	BYTE node_uuid[32];
}__attribute__((packed)) RECORD(TCM_OBJECT_QUERY,PUBLICKEY);

typedef struct tcm_pikget_desc{
	char username[32];
	char user_role[32];
	BYTE node_uuid[32];
	BYTE pik_uuid[32];
	BYTE pikcert_uuid[32];
	BYTE signkey_uuid[32];
	BYTE unbindkey_uuid[32];
}__attribute__((packed)) RECORD(TCM_PIK_QUERY,PIK);
